home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-07-06 | 28.9 KB | 1,147 lines |
- diff -u -r --new-file last-version/docs/smb.conf.5 samba-1.9.14alpha8/docs/smb.conf.5
- --- last-version/docs/smb.conf.5 Fri Jun 30 18:12:17 1995
- +++ samba-1.9.14alpha8/docs/smb.conf.5 Thu Jul 6 16:42:42 1995
- @@ -35,6 +35,9 @@
- Any line beginning with a semicolon is ignored, as are lines containing
- only whitespace.
-
- +Any line ending in a \ is "continued" on the next line in the
- +customary unix fashion.
- +
- The values following the equals sign in parameters are all either a string
- (no quotes needed) or a boolean, which may be given as yes/no, 0/1 or
- true/false. Case is not significant in boolean values, but is preserved
- diff -u -r --new-file last-version/docs/smbclient.1 samba-1.9.14alpha8/docs/smbclient.1
- --- last-version/docs/smbclient.1 Thu Mar 30 11:34:41 1995
- +++ samba-1.9.14alpha8/docs/smbclient.1 Thu Jul 6 17:25:41 1995
- @@ -354,6 +354,9 @@
- Parameters to commands may or may not be case sensitive, depending on the
- command.
-
- +You can specify file names which have spaces in them by quoting the
- +name with double quotes, for example "a long file name".
- +
- Parameters shown in square brackets (eg., "[parameter]") are optional. If not
- given, the command will use suitable defaults. Parameters shown in angle
- brackets (eg., "<parameter>") are required.
- diff -u -r --new-file last-version/source/Makefile samba-1.9.14alpha8/source/Makefile
- --- last-version/source/Makefile Mon Jul 3 10:00:20 1995
- +++ samba-1.9.14alpha8/source/Makefile Thu Jul 6 17:31:25 1995
- @@ -379,6 +379,12 @@
- # FLAGSM = -DCRAY -U__STDC__ -DQUOTAS
- # LIBSM =
-
- +# This is for Convex
- +# contributed by Victor Balashov <balashov@cv.jinr.dubna.su>
- +# and Ulrich Hahn <ulrich.hahn@zdv.uni-tuebingen.de>
- +# FLAGSM= -DCONVEX -DSHADOW_PWD
- +# LIBSM=
- +
-
-
- ######################################################################
- diff -u -r --new-file last-version/source/change-log samba-1.9.14alpha8/source/change-log
- --- last-version/source/change-log Wed Jul 5 18:51:08 1995
- +++ samba-1.9.14alpha8/source/change-log Thu Jul 6 18:08:50 1995
- @@ -1497,6 +1497,18 @@
- - fixed MemMove bug (thanks to mass@tanner.com (Massimo
- Sivilotti))
- - released alpha7
- + - rewrote MemMove to be a little more efficient
- + - ipc va_arg bug fix from djg@tas.com (Dave Gesswein)
- + - added check for illegal chars in long filenames
- + - fixed name cache init bug in nmbd
- + - Convex patches from Victor Balashov <balashov@cv.jinr.dubna.su>
- + - timestring() bugfix from staale@spacetec.no
- + - changed %H to give path of forced user if one is set
- + - added quoting to smbclient to allow spaces in filenames
- + - convex and other patches from Ulrich Hahn
- + <ulrich.hahn@zdv.uni-tuebingen.de>
- + - released alpha8
- +
-
- ==========
- todo:
- @@ -1508,7 +1520,7 @@
- add option to print more info about locked files (full path, share name
- etc)
-
- -sort by inode on opendir?
- +add masking to opendir?
-
- rename only if not rdonly?
-
- @@ -1519,8 +1531,6 @@
-
- winDD - check uid matching??
-
- -problems with : in filenames from Win95 ?
- -
- protocol drop back in client to avoid openX etc.
-
- print queue deletion problem with mapped usernames (greyed out)
- @@ -1532,8 +1542,6 @@
- handle exported fat drives to a long filename capable client
-
- add check for existance of lpq commands etc (use stat?)
- -
- -use ACCMODE to mask O_ stuff
-
- example showing popup on login containing "quota -v"
-
- diff -u -r --new-file last-version/source/client.c samba-1.9.14alpha8/source/client.c
- --- last-version/source/client.c Wed Jul 5 14:21:55 1995
- +++ samba-1.9.14alpha8/source/client.c Thu Jul 6 17:20:27 1995
- @@ -390,11 +390,11 @@
- ****************************************************************************/
- static void cmd_cd(char *inbuf,char *outbuf )
- {
- - char *p;
- + fstring buf;
- + char *p = buf;
- pstring saved_dir;
-
- - p = strtok(NULL,SEPARATORS);
- - if (p)
- + if (next_token(NULL,buf,NULL))
- {
- pstring dname;
-
- @@ -899,14 +899,14 @@
- {
- int attribute = aDIR | aSYSTEM | aHIDDEN;
- pstring mask;
- - char *p;
- + fstring buf;
- + char *p=buf;
-
- strcpy(mask,cur_dir);
- if(mask[strlen(mask)-1]!='\\')
- strcat(mask,"\\");
-
- - p = strtok(NULL,SEPARATORS);
- - if (p)
- + if (next_token(NULL,buf,NULL))
- {
- if (*p == '\\')
- strcpy(mask,p);
- @@ -1346,19 +1346,16 @@
- strcpy(rname,cur_dir);
- strcat(rname,"\\");
-
- - p = strtok(NULL,SEPARATORS);
- - if (!p)
- - {
- - DEBUG(0,("get <filename>\n"));
- - return;
- - }
- - strcat(rname,p);
- - dos_clean_name(rname);
- - strcpy(lname,p);
- + p = rname + strlen(rname);
-
- - p = strtok(NULL,SEPARATORS);
- - if (p)
- - strcpy(lname,p);
- + if (!next_token(NULL,p,NULL)) {
- + DEBUG(0,("get <filename>\n"));
- + return;
- + }
- + strcpy(lname,p);
- + dos_clean_name(rname);
- +
- + next_token(NULL,lname,NULL);
-
- do_get(rname,lname,NULL);
- }
- @@ -1455,7 +1452,8 @@
- {
- int attribute = aSYSTEM | aHIDDEN;
- pstring mget_mask;
- - char *p;
- + fstring buf;
- + char *p=buf;
-
- *mget_mask = 0;
-
- @@ -1464,7 +1462,7 @@
-
- abort_mget = False;
-
- - while ((p = strtok(NULL,SEPARATORS)))
- + while (next_token(NULL,p,NULL))
- {
- strcpy(mget_mask,cur_dir);
- if(mget_mask[strlen(mget_mask)-1]!='\\')
- @@ -1539,12 +1537,12 @@
- static void cmd_mkdir(char *inbuf,char *outbuf)
- {
- pstring mask;
- - char *p;
- + fstring buf;
- + char *p=buf;
-
- strcpy(mask,cur_dir);
-
- - p = strtok(NULL,SEPARATORS);
- - if (!p)
- + if (!next_token(NULL,p,NULL))
- {
- if (!recurse)
- DEBUG(0,("mkdir <dirname>\n"));
- @@ -1824,23 +1822,23 @@
- {
- pstring lname;
- pstring rname;
- - char *p;
- + fstring buf;
- + char *p=buf;
- file_info finfo;
- finfo = def_finfo;
-
- strcpy(rname,cur_dir);
- strcat(rname,"\\");
-
- - p = strtok(NULL,SEPARATORS);
- - if (!p)
- +
- + if (!next_token(NULL,p,NULL))
- {
- DEBUG(0,("put <filename>\n"));
- return;
- }
- strcpy(lname,p);
-
- - p = strtok(NULL,SEPARATORS);
- - if (p)
- + if (next_token(NULL,p,NULL))
- strcat(rname,p);
- else
- strcat(rname,lname);
- @@ -1880,11 +1878,8 @@
- ****************************************************************************/
- static void cmd_select(void)
- {
- - char *p = strtok(NULL,SEPARATORS);
- - if (p)
- - strcpy(fileselection,p);
- - else
- - strcpy(fileselection,"");
- + strcpy(fileselection,"");
- + next_token(NULL,fileselection,NULL);
- }
-
-
- @@ -1896,12 +1891,13 @@
- pstring lname;
- pstring rname;
- file_info finfo;
- - char *p;
- + fstring buf;
- + char *p=buf;
-
- finfo = def_finfo;
-
-
- - while ((p = strtok(NULL,SEPARATORS)))
- + while (next_token(NULL,p,NULL))
- {
- pstring cmd;
- pstring tmpnam;
- @@ -2020,7 +2016,7 @@
- ****************************************************************************/
- static void cmd_cancel(char *inbuf,char *outbuf )
- {
- - char *p;
- + fstring buf;
- int job;
-
- if (!connect_as_printer)
- @@ -2029,15 +2025,14 @@
- DEBUG(0,("Trying to cancel print jobs without -P may fail\n"));
- }
-
- - p = strtok(NULL,SEPARATORS);
- - if (!p) {
- + if (!next_token(NULL,buf,NULL)) {
- printf("cancel <jobid> ...\n");
- return;
- }
- - for (;p;p=strtok(NULL,SEPARATORS)) {
- - job = atoi(p);
- + do {
- + job = atoi(buf);
- do_cancel(job);
- - }
- + } while (next_token(NULL,buf,NULL));
- }
-
-
- @@ -2059,13 +2054,11 @@
- DEBUG(0,("Trying to print without -P may fail\n"));
- }
-
- - p = strtok(NULL,SEPARATORS);
- - if (!p)
- + if (!next_token(NULL,lname,NULL))
- {
- DEBUG(0,("print <filename>\n"));
- return;
- }
- - strcpy(lname,p);
-
- strcpy(rname,lname);
- p = strrchr(rname,'/');
- @@ -2307,21 +2300,20 @@
- static void cmd_del(char *inbuf,char *outbuf )
- {
- pstring mask;
- - char *p;
- + fstring buf;
- int attribute = aSYSTEM | aHIDDEN;
-
- if (recurse)
- attribute |= aDIR;
-
- strcpy(mask,cur_dir);
- -
- - p = strtok(NULL,SEPARATORS);
- - if (!p)
- +
- + if (!next_token(NULL,buf,NULL))
- {
- DEBUG(0,("del <filename>\n"));
- return;
- }
- - strcat(mask,p);
- + strcat(mask,buf);
-
- do_dir((char *)inbuf,(char *)outbuf,mask,attribute,do_del,False);
- }
- @@ -2333,18 +2325,17 @@
- static void cmd_rmdir(char *inbuf,char *outbuf )
- {
- pstring mask;
- + fstring buf;
- char *p;
-
- strcpy(mask,cur_dir);
-
- - p = strtok(NULL,SEPARATORS);
- - if (!p)
- + if (!next_token(NULL,buf,NULL))
- {
- DEBUG(0,("rmdir <dirname>\n"));
- return;
- }
- - strcat(mask,p);
- -
- + strcat(mask,buf);
-
- bzero(outbuf,smb_size);
- set_message(outbuf,0,2 + strlen(mask),True);
- @@ -2384,10 +2375,12 @@
- ****************************************************************************/
- static void cmd_newer(void)
- {
- - char *p = strtok(NULL,SEPARATORS);
- + fstring buf;
- + BOOL ok;
- struct stat sbuf;
-
- - if (p && (stat(p,&sbuf) == 0))
- + ok = next_token(NULL,buf,NULL);
- + if (ok && (stat(buf,&sbuf) == 0))
- {
- newer_than = sbuf.st_mtime + GMT_TO_LOCAL*TimeDiff(sbuf.st_mtime);
- DEBUG(1,("Getting files newer than %s",asctime(LocalTime(&newer_than,0))));
- @@ -2395,7 +2388,7 @@
- else
- newer_than = 0;
-
- - if (p && newer_than == 0)
- + if (ok && newer_than == 0)
- DEBUG(0,("Error setting newer-than time\n"));
- }
-
- @@ -2404,11 +2397,11 @@
- ****************************************************************************/
- static void cmd_archive(void)
- {
- - char *p = strtok(NULL,SEPARATORS);
- + fstring buf;
-
- - if (p)
- - archive_level = atoi(p);
- - else
- + if (next_token(NULL,buf,NULL)) {
- + archive_level = atoi(buf);
- + } else
- DEBUG(0,("Archive level is %d\n",archive_level));
- }
-
- @@ -2449,20 +2442,19 @@
- ****************************************************************************/
- static void cmd_printmode(void)
- {
- - char *p;
- - pstring mode;
- + fstring buf;
- + fstring mode;
-
- - p = strtok(NULL,SEPARATORS);
- - if (p)
- + if (next_token(NULL,buf,NULL))
- {
- - if (strequal(p,"text"))
- + if (strequal(buf,"text"))
- printmode = 0;
- else
- {
- - if (strequal(p,"graphics"))
- + if (strequal(buf,"graphics"))
- printmode = 1;
- else
- - printmode = atoi(p);
- + printmode = atoi(buf);
- }
- }
-
- @@ -2487,12 +2479,11 @@
- ****************************************************************************/
- static void cmd_lcd(void)
- {
- - char *p;
- + fstring buf;
- pstring d;
-
- - p = strtok(NULL,SEPARATORS);
- - if (p)
- - chdir(p);
- + if (next_token(NULL,buf,NULL))
- + chdir(buf);
- DEBUG(2,("the local directory is now %s\n",GetWd(d)));
- }
-
- @@ -3230,14 +3221,13 @@
- void cmd_help(void)
- {
- int i=0;
- - char *p;
- + fstring buf;
-
- - p = strtok(NULL,SEPARATORS);
- - if (p)
- + if (next_token(NULL,buf,NULL))
- {
- while (commands[i].description)
- {
- - if (strequal(commands[i].name,p))
- + if (strequal(commands[i].name,buf))
- DEBUG(0,("HELP %s:\n\t%s\n\n",commands[i].name,commands[i].description));
- i++;
- }
- @@ -3436,7 +3426,7 @@
-
- while (!feof(stdin))
- {
- - char *tok;
- + fstring tok;
- int i;
- BOOL found = False;
-
- @@ -3473,7 +3463,10 @@
- }
-
- /* and get the first part of the command */
- - tok = strtok(line,SEPARATORS);
- + {
- + char *ptr = line;
- + if (!next_token(&ptr,tok,NULL)) continue;
- + }
-
- i = 0;
- while (commands[i].fn != NULL)
- @@ -3485,7 +3478,7 @@
- }
- i++;
- }
- - if (!found && tok)
- + if (!found)
- DEBUG(0,("%s: command not found\n",CNV_LANG(tok)));
- }
-
- diff -u -r --new-file last-version/source/clitar.c samba-1.9.14alpha8/source/clitar.c
- --- last-version/source/clitar.c Tue Jul 4 12:01:26 1995
- +++ samba-1.9.14alpha8/source/clitar.c Thu Jul 6 17:37:58 1995
- @@ -1208,17 +1208,16 @@
-
- void cmd_block(void)
- {
- - char *p;
- + fstring buf;
- int block;
-
- - p=strtok(NULL, SEPARATORS);
- - if (!p)
- + if (!next_token(NULL,buf,NULL))
- {
- DEBUG(0, ("blocksize <n>\n"));
- return;
- }
-
- - block=atoi(p);
- + block=atoi(buf);
- if (block < 0 || block > 65535)
- {
- DEBUG(0, ("blocksize out of range"));
- @@ -1231,18 +1230,18 @@
-
- void cmd_tarmode(void)
- {
- - char *p;
- + fstring buf;
-
- - while ((p=strtok(NULL, SEPARATORS))) {
- - if (strequal(p, "full"))
- + while (next_token(NULL,buf,NULL)) {
- + if (strequal(buf, "full"))
- tar_inc=False;
- - else if (strequal(p, "inc"))
- + else if (strequal(buf, "inc"))
- tar_inc=True;
- - else if (strequal(p, "reset"))
- + else if (strequal(buf, "reset"))
- tar_reset=True;
- - else if (strequal(p, "noreset"))
- + else if (strequal(buf, "noreset"))
- tar_reset=False;
- - else DEBUG(0, ("tarmode: unrecognised option %s\n", p));
- + else DEBUG(0, ("tarmode: unrecognised option %s\n", buf));
- }
-
- DEBUG(0, ("tarmode is now %s, %s\n",
- @@ -1254,23 +1253,23 @@
-
- void cmd_setmode(void)
- {
- - char *p, *q;
- + char *q;
- + fstring buf;
- pstring fname;
- int attra[2]={0, 0};
- int direct=1;
-
- - p=strtok(NULL, SEPARATORS);
- - if (!p)
- + if (!next_token(NULL,buf,NULL))
- {
- DEBUG(0, ("setmode <filename> <perm=[+|-]rsha>\n"));
- return;
- }
-
- strcpy(fname, cur_dir);
- - strcat(fname, p);
- + strcat(fname, buf);
-
- - while ((p=strtok(NULL, SEPARATORS))) {
- - q=p;
- + while (next_token(NULL,buf,NULL)) {
- + q=buf;
-
- while(*q)
- switch (*q++) {
- @@ -1310,18 +1309,17 @@
- {
- int attribute = aDIR | aSYSTEM | aHIDDEN;
- pstring ffname, tarmac;
- - char *p;
- + fstring buf;
- + char *p = buf;
-
- - p = strtok(NULL,SEPARATORS);
- - if (!p)
- + if (!next_token(NULL,buf,NULL))
- {
- DEBUG(0,("tar [c|x] <filename>\n"));
- return;
- }
-
- if (*p == 'c') {
- - p = strtok(NULL,SEPARATORS);
- - if (!p)
- + if (!next_token(NULL,buf,NULL))
- {
- DEBUG(0,("tar [c|x] <filename> [<tar mask>]\n"));
- return;
- @@ -1343,7 +1341,7 @@
- initarbuf();
-
- strcpy(tarmac,cur_dir);
- - if ((p = strtok(NULL,SEPARATORS)))
- + if (next_token(NULL,buf,NULL))
- do {
- if(tarmac[strlen(tarmac)-1]!='\\')
- strcat(tarmac,"\\");
- @@ -1352,7 +1350,7 @@
- strcpy(tarmac,p);
- else
- strcat(tarmac,p);
- - } while ((p = strtok(NULL,SEPARATORS)));
- + } while (next_token(NULL,buf,NULL));
- else
- strcat(tarmac,"*.*");
-
- @@ -1365,8 +1363,7 @@
- DEBUG(0, ("tar: dumped %d tar files\n", ntarf));
- }
- else if (*p=='x') {
- - p = strtok(NULL,SEPARATORS);
- - if (!p)
- + if (!next_token(NULL,buf,NULL))
- {
- DEBUG(0,("tar [c|x] <filename> [<tar mask>]\n"));
- return;
- diff -u -r --new-file last-version/source/includes.h samba-1.9.14alpha8/source/includes.h
- --- last-version/source/includes.h Wed Jul 5 00:55:26 1995
- +++ samba-1.9.14alpha8/source/includes.h Thu Jul 6 17:42:16 1995
- @@ -156,7 +156,7 @@
- #include <pwdadj.h>
- #endif
-
- -#if defined(SHADOW_PWD) && !defined(NETBSD)
- +#if defined(SHADOW_PWD) && !defined(NETBSD) && !defined(CONVEX)
- #include <shadow.h>
- #endif
-
- @@ -662,6 +662,24 @@
- #define ftruncate(f,l) chsize(f,l)
- #endif /* DNIX */
-
- +#ifdef CONVEX
- +#define SIGNAL_CAST (void (*)(int))
- +#include <netinet/tcp.h>
- +#include <arpa/inet.h>
- +#include <dirent.h>
- +#include <string.h>
- +#include <sys/vfs.h>
- +#include <netinet/in.h>
- +#include <errno.h>
- +#include <sys/wait.h>
- +#include <signal.h>
- +#include <fcntl.h>
- +#define DONT_REINSTALL_SIG
- +#define USE_SIGBLOCK
- +#define USE_WAITPID
- +#define SIGNAL_CAST (_SigFunc_Ptr_t)
- +#define NO_GETSPNAM
- +#endif
-
-
- #ifdef CRAY
- diff -u -r --new-file last-version/source/ipc.c samba-1.9.14alpha8/source/ipc.c
- --- last-version/source/ipc.c Wed Jul 5 16:43:41 1995
- +++ samba-1.9.14alpha8/source/ipc.c Thu Jul 6 14:42:19 1995
- @@ -28,6 +28,11 @@
- #include "loadparm.h"
- #include "pcap.h"
-
- +#ifdef CHECK_TYPES
- +#undef CHECK_TYPES
- +#endif
- +#define CHECK_TYPES 0
- +
- extern int DEBUGLEVEL;
- extern int maxxmit;
- extern files_struct Files[];
- @@ -271,6 +276,7 @@
- int needed=0, stringneeded;
- char* str=NULL;
- int is_string=0, stringused;
- + int32 temp;
-
- #ifdef __STDC__
- va_start(args,p);
- @@ -300,7 +306,8 @@
- switch( *p->curpos++ ) {
- case 'W': /* word (2 byte) */
- needed = 2;
- - if (p->buflen >= needed) SSVAL(p->structbuf,0,va_arg(args,int16));
- + temp = va_arg(args,int16);
- + if (p->buflen >= needed) SSVAL(p->structbuf,0,temp);
- break;
- case 'N': /* count of substructures (word) at end */
- needed = 2;
- @@ -309,7 +316,8 @@
- break;
- case 'D': /* double word (4 byte) */
- needed = 4;
- - if (p->buflen >= needed) SIVAL(p->structbuf,0,va_arg(args,int32));
- + temp = va_arg(args,int32);
- + if (p->buflen >= needed) SIVAL(p->structbuf,0,temp);
- break;
- case 'B': /* byte (with optional counter) */
- needed = get_counter(&p->curpos);
- diff -u -r --new-file last-version/source/local.h samba-1.9.14alpha8/source/local.h
- --- last-version/source/local.h Tue Jul 4 15:11:52 1995
- +++ samba-1.9.14alpha8/source/local.h Thu Jul 6 13:50:28 1995
- @@ -61,6 +61,14 @@
- #define LPQ_COMMAND "lpq -P"
- #endif
-
- +/* shall guest entries in printer queues get changed to user entries,
- + so they can be deleted using the windows print manager? */
- +#define LPQ_GUEST_TO_USER
- +
- +/* shall filenames with illegal chars in them get mangled in long
- + filename listings? */
- +#define MANGLE_LONG_FILENAMES
- +
- /* define this if you want to stop spoofing with .. and soft links
- NOTE: This also slows down the server considerably */
- #define REDUCE_PATHS
- diff -u -r --new-file last-version/source/nameserv.c samba-1.9.14alpha8/source/nameserv.c
- --- last-version/source/nameserv.c Wed Jul 5 13:56:10 1995
- +++ samba-1.9.14alpha8/source/nameserv.c Thu Jul 6 17:51:39 1995
- @@ -97,11 +97,17 @@
- ****************************************************************************/
- static int sig_hup()
- {
- + BlockSignals(True);
- +
- DEBUG(0,("Got SIGHUP - not implemented\n"));
- dump_names();
- if (!is_daemon)
- exit(1);
- +
- + BlockSignals(False);
- +#ifndef DONT_REINSTALL_SIG
- signal(SIGHUP,SIGNAL_CAST sig_hup);
- +#endif
- return(0);
- }
-
- @@ -110,9 +116,12 @@
- ****************************************************************************/
- static int sig_pipe()
- {
- + BlockSignals(True);
- +
- DEBUG(0,("Got SIGPIPE\n"));
- if (!is_daemon)
- exit(1);
- + BlockSignals(False);
- return(0);
- }
-
- @@ -155,31 +164,29 @@
- static int add_name(void)
- {
- int i;
- - name_struct *n;
-
- for (i=0;i<num_names;i++)
- if (!names[i].valid)
- - return(i);
- + break;
-
- - if (num_names == 0)
- - n = (name_struct *)malloc(sizeof(name_struct));
- - else
- - n = (name_struct *)realloc(names,sizeof(name_struct)*(num_names+1));
- - if (!n)
- - {
- + if (i==num_names) {
- + name_struct *n;
- + if (num_names == 0)
- + n = (name_struct *)malloc(sizeof(name_struct));
- + else
- + n = (name_struct *)realloc(names,sizeof(name_struct)*(num_names+1));
- + if (!n) {
- DEBUG(0,("Can't malloc more names space!\n"));
- return(-1);
- }
- - n[num_names].valid = False;
- - n[num_names].found_master = False;
- - n[num_names].isgroup = False;
- - n[num_names].unicast = False;
- - strcpy(n[num_names].name,"");
- - n[num_names].ttl = 0;
- - n[num_names].start_time = 0;
- - names = n;
- - num_names++;
- - return(num_names-1);
- + i = num_names;
- + num_names++;
- + names = n;
- + }
- +
- + bzero(&names[i],sizeof(names[i]));
- +
- + return(i);
- }
-
- /****************************************************************************
- diff -u -r --new-file last-version/source/params.c samba-1.9.14alpha8/source/params.c
- --- last-version/source/params.c Mon Jul 3 12:04:10 1995
- +++ samba-1.9.14alpha8/source/params.c Thu Jul 6 17:27:20 1995
- @@ -259,7 +259,7 @@
- if (pszParmFile == NULL || strlen(pszParmFile) < 1)
- DEBUG(0,( "No configuration filename specified!\n"));
- else
- - if ((fileIn = fopen(pszParmFile, "rt")) == NULL)
- + if ((fileIn = fopen(pszParmFile, "r")) == NULL)
- DEBUG(0,( "Unable to open configuration file \"%s\"!\n", pszParmFile));
- else
- {
- diff -u -r --new-file last-version/source/password.c samba-1.9.14alpha8/source/password.c
- --- last-version/source/password.c Wed Jul 5 17:29:44 1995
- +++ samba-1.9.14alpha8/source/password.c Thu Jul 6 17:46:42 1995
- @@ -143,7 +143,7 @@
- char *p, *q;
-
- p=line+strlen(username)+1;
- - if (q=strchr(p, ':')) {
- + if ((q=strchr(p, ':'))) {
- *q=0;
- if (q-p+1>20)
- break;
- diff -u -r --new-file last-version/source/printing.c samba-1.9.14alpha8/source/printing.c
- --- last-version/source/printing.c Wed Jul 5 14:01:05 1995
- +++ samba-1.9.14alpha8/source/printing.c Thu Jul 6 17:48:00 1995
- @@ -444,9 +444,9 @@
- }
-
-
- -char *stat0_strings[] = { "enabled", "online", "idle", NULL };
- -char *stat1_strings[] = { "offline", "disabled", "down", "off", NULL };
- -char *stat2_strings[] = { "jam", "paper", "error", "responding", "not accepting", "not running", NULL };
- +char *stat0_strings[] = { "enabled", "online", "idle", "no entries", "free", "ready", NULL };
- +char *stat1_strings[] = { "offline", "disabled", "down", "off", "waiting", "no daemon", NULL };
- +char *stat2_strings[] = { "jam", "paper", "error", "responding", "not accepting", "not running", "turned off", NULL };
-
- /****************************************************************************
- parse a lpq line. Choose printing style
- @@ -473,6 +473,7 @@
- break;
- }
-
- +#ifdef LPQ_GUEST_TO_USER
- if (ret) {
- extern pstring sesssetup_user;
- /* change guest entries to the current logged in user to make
- @@ -480,6 +481,7 @@
- if (sesssetup_user[0] && strequal(buf->user,lp_guestaccount(snum)))
- strcpy(buf->user,sesssetup_user);
- }
- +#endif
-
- if (status && !ret)
- {
- diff -u -r --new-file last-version/source/server.c samba-1.9.14alpha8/source/server.c
- --- last-version/source/server.c Wed Jul 5 17:31:14 1995
- +++ samba-1.9.14alpha8/source/server.c Thu Jul 6 17:54:31 1995
- @@ -1526,6 +1526,7 @@
- }
- depth++;
-
- + BlockSignals(True);
- DEBUG(5,("got SIGCLD\n"));
-
- #ifdef USE_WAITPID
- @@ -1539,16 +1540,19 @@
- child that has exited. This would lead to an infinite recursion
- if done vice versa. */
-
- +#ifndef DONT_REINSTALL_SIG
- #ifdef SIGCLD_IGNORE
- signal(SIGCLD, SIG_IGN);
- #else
- signal(SIGCLD, SIGNAL_CAST sig_cld);
- #endif
- +#endif
-
- #ifndef USE_WAITPID
- while (wait3(WAIT3_CAST1 NULL, WNOHANG, WAIT3_CAST2 NULL) > 0);
- #endif
- depth--;
- + BlockSignals(False);
- return 0;
- }
- #endif
- @@ -1816,11 +1820,13 @@
- ****************************************************************************/
- static int sig_hup()
- {
- + BlockSignals(True);
- DEBUG(0,("Got SIGHUP\n"));
- reload_services(False);
- -#ifndef NO_SIGNAL_TEST
- +#ifndef DONT_REINSTALL_SIG
- signal(SIGHUP,SIGNAL_CAST sig_hup);
- #endif
- + BlockSignals(False);
- return(0);
- }
-
- @@ -1943,15 +1949,6 @@
- string_set(&Connections[cnum].dirpath,"");
- string_set(&Connections[cnum].user,user);
-
- - {
- - pstring s;
- - strcpy(s,lp_pathname(snum));
- - standard_sub(cnum,s);
- - string_set(&Connections[cnum].connectpath,s);
- - DEBUG(3,("Connect path is %s\n",s));
- - }
- -
- -
- #if HAVE_GETGRNAM
- if (*lp_force_group(snum))
- {
- @@ -1982,6 +1979,14 @@
- else
- DEBUG(1,("Couldn't find user %s\n",fuser));
- }
- +
- + {
- + pstring s;
- + strcpy(s,lp_pathname(snum));
- + standard_sub(cnum,s);
- + string_set(&Connections[cnum].connectpath,s);
- + DEBUG(3,("Connect path is %s\n",s));
- + }
-
- /* groups stuff added by ih */
- Connections[cnum].ngroups = 0;
- diff -u -r --new-file last-version/source/smb.h samba-1.9.14alpha8/source/smb.h
- --- last-version/source/smb.h Wed Jul 5 17:31:29 1995
- +++ samba-1.9.14alpha8/source/smb.h Thu Jul 6 17:51:56 1995
- @@ -548,6 +548,7 @@
- };
-
- /* and a few prototypes */
- +void BlockSignals(BOOL block);
- void msleep(int t);
- int file_lock(char *name,int timeout);
- void file_unlock(int fd);
- diff -u -r --new-file last-version/source/trans2.c samba-1.9.14alpha8/source/trans2.c
- --- last-version/source/trans2.c Wed Jul 5 14:37:32 1995
- +++ samba-1.9.14alpha8/source/trans2.c Thu Jul 6 13:57:15 1995
- @@ -346,6 +346,24 @@
- p = pdata;
- name_ptr = p;
-
- +#ifdef MANGLE_LONG_FILENAMES
- + {
- + BOOL illegal = False;
- + int i;
- + int l = strlen(fname);
- + for (i=0;i<l;i++)
- + if (strchr("*\\/?<>|\":{}",fname[i])) {
- + illegal = True;
- + break;
- + }
- + if (illegal) {
- + fstring fname2;
- + name_convert(fname2,fname,True,NULL);
- + strcpy(fname,fname2);
- + }
- + }
- +#endif
- +
- switch (info_level)
- {
- case 1:
- diff -u -r --new-file last-version/source/util.c samba-1.9.14alpha8/source/util.c
- --- last-version/source/util.c Wed Jul 5 17:38:14 1995
- +++ samba-1.9.14alpha8/source/util.c Thu Jul 6 17:59:44 1995
- @@ -243,11 +243,17 @@
- ****************************************************************************/
- BOOL next_token(char **ptr,char *buff,char *sep)
- {
- - char *s = *ptr;
- + static char *last_ptr=NULL;
- + char *s;
- BOOL quoted;
-
- + if (!ptr) ptr = &last_ptr;
- + if (!ptr) return(False);
- +
- + s = *ptr;
- +
- /* default to simple separators */
- - if (!sep) sep = " \t";
- + if (!sep) sep = " \t\n\r";
-
- /* find the first non sep char */
- while(*s && strchr(sep,*s)) s++;
- @@ -264,57 +270,67 @@
- *buff++ = *s;
- }
-
- - *ptr = (*s) ? s+1 : s;
- + *ptr = (*s) ? s+1 : s;
- *buff = 0;
- + last_ptr = *ptr;
-
- return(True);
- }
-
- /*******************************************************************
- safely copies memory, ensuring no overlap problems.
- +this is only used if the machine does not have it's own memmove().
- +this is not the fastest algorithm in town, but it will do for our
- +needs.
- ********************************************************************/
- void *MemMove(void *dest,void *src,int size)
- {
- - /* do the copy in chunks of size difference. This relies on the
- - capability of pointer comparison. */
- - int difference = PTR_DIFF(dest,src);
- -
- - if (difference == 0 || size <= 0)
- - return(dest);
- + unsigned long d,s;
- + int i;
- + if (dest==src || !size) return(dest);
-
- - if (difference < 0) difference = -difference;
- -
- - if (difference >= size) /* no overlap problem */
- - {
- - memcpy(dest,src,size);
- - return(dest);
- - }
- + d = (unsigned long)dest;
- + s = (unsigned long)src;
- +
- + if ((d >= (s+size)) || (s >= (d+size))) {
- + /* no overlap */
- + memcpy(dest,src,size);
- + return(dest);
- + }
-
- - if (dest > src) /* copy the last chunks first */
- + if (d < s)
- {
- - char *this_dest=dest;
- - char *this_src=src;
- - this_dest += size - difference;
- - this_src += size - difference;
- - while (size>0)
- - {
- - memcpy(this_dest,this_src,difference);
- - this_dest -= difference;
- - this_src -= difference;
- - size -= difference;
- - }
- + /* we can forward copy */
- + if (s-d >= sizeof(int) &&
- + !(s%sizeof(int)) && !(d%sizeof(int)) && !(size%sizeof(int))) {
- + /* do it all as words */
- + int *idest = (int *)dest;
- + int *isrc = (int *)src;
- + size /= sizeof(int);
- + for (i=0;i<size;i++) idest[i] = isrc[i];
- + } else {
- + /* simplest */
- + char *cdest = (char *)dest;
- + char *csrc = (char *)src;
- + for (i=0;i<size;i++) cdest[i] = csrc[i];
- + }
- }
- else
- - { /* copy from the front */
- - char *this_dest=dest;
- - char *this_src=src;
- - while (size>0)
- - {
- - memcpy(this_dest,this_src,difference);
- - this_dest += difference;
- - this_src += difference;
- - size -= difference;
- - }
- + {
- + /* must backward copy */
- + if (d-s >= sizeof(int) &&
- + !(s%sizeof(int)) && !(d%sizeof(int)) && !(size%sizeof(int))) {
- + /* do it all as words */
- + int *idest = (int *)dest;
- + int *isrc = (int *)src;
- + size /= sizeof(int);
- + for (i=size-1;i>=0;i--) idest[i] = isrc[i];
- + } else {
- + /* simplest */
- + char *cdest = (char *)dest;
- + char *csrc = (char *)src;
- + for (i=size-1;i>=0;i--) cdest[i] = csrc[i];
- + }
- }
- return(dest);
- }
- @@ -458,14 +474,14 @@
- t = time(NULL);
- #ifdef NO_STRFTIME
- strcpy(TimeBuf, asctime(LocalTime(&t,GMT_TO_LOCAL)));
- -#elif defined(CLIX)
- +#elif defined(CLIX) || defined(CONVEX)
- strftime(TimeBuf,100,"%m/%d/%y %I:%M:%S %p",LocalTime(&t,GMT_TO_LOCAL));
- #elif defined(AMPM)
- strftime(TimeBuf,100,"%D %r",LocalTime(&t,GMT_TO_LOCAL));
- #elif defined(TZ_TIME)
- {
- strftime(TimeBuf,100,"%D:%T",LocalTime(&t,0));
- - sprintf(TimeBuf+strlen(TimeBuf)," %+02d%02d",
- + sprintf(TimeBuf+strlen(TimeBuf)," %+03d%02d",
- -TimeDiff(t)/(60*60),-(TimeDiff(t)/60)%60);
- }
- #else
- @@ -739,7 +755,7 @@
- &t.tm_mday,&t.tm_hour,&t.tm_min,&t.tm_sec);
- t.tm_wday = 1;
- t.tm_yday = 1;
- - t.tm_isdst = 0;
- + t.tm_isdst = -1;
-
- return (TimeLocal(&t,GMT_TO_LOCAL));
- }
- @@ -3595,7 +3611,7 @@
- int interpret_long_filename(int level,char *p,file_info *finfo)
- {
- if (finfo)
- - *finfo = def_finfo;
- + memcpy(finfo,&def_finfo,sizeof(*finfo));
-
- switch (level)
- {
- @@ -3854,6 +3870,21 @@
- return(name);
- }
-
- +/*******************************************************************
- +block sigs
- +********************************************************************/
- +void BlockSignals(BOOL block)
- +{
- +#ifdef USE_SIGBLOCK
- + int block_mask = (sigmask(SIGTERM)|sigmask(SIGQUIT)|sigmask(SIGSEGV)
- + |sigmask(SIGCHLD)|sigmask(SIGQUIT)|sigmask(SIGBUS)|
- + sigmask(SIGINT));
- + if (block)
- + sigblock(block_mask);
- + else
- + sigunblock(block_mask);
- +#endif
- +}
-
- #ifdef USE_DIRECT
- #define DIRECT direct
- diff -u -r --new-file last-version/source/version.h samba-1.9.14alpha8/source/version.h
- --- last-version/source/version.h Wed Jul 5 18:54:04 1995
- +++ samba-1.9.14alpha8/source/version.h Thu Jul 6 18:11:04 1995
- @@ -1 +1 @@
- -#define VERSION "1.9.14alpha7"
- +#define VERSION "1.9.14alpha8"
-